﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Map1 : MonoBehaviour
{
    //四周的障碍引用
    public GameObject edgePrefab;

    //玩家出生引用
    public GameObject bornPrefab;

    private void Awake()
    {
        // x轴
        for(int i=-10;i<=10;i++){
            Instantiate(edgePrefab, new Vector3(i, 9, 0), Quaternion.identity);
            Instantiate(edgePrefab, new Vector3(i, -9, 0), Quaternion.identity);
        }
        //y轴
        for(int i=-9;i<=9;i++){
            Instantiate(edgePrefab, new Vector3(10, i, 0), Quaternion.identity);
            Instantiate(edgePrefab, new Vector3(-10, i, 0), Quaternion.identity);
        }

        Instantiate(bornPrefab, new Vector3(-2, -8, 0), Quaternion.identity);
    }

    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {

    }
}
